This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 8, 2012, 7:05 AM
68 Posts
topic has been resolvedResolved

Full update using command - Server Side

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer,Administrator
  • Tags:
  • Replies: 11
Hi
 
How to make full page update via command in server side scipt is it possible ?
Jun 8, 2012, 8:31 AM
135 Posts
Re: Full update using command - Server Side
When SSJS is running the update is already occurring. Can you tell us more about what you are trying to achieve?
Jun 8, 2012, 6:55 PM
68 Posts
Re: Full update using command - Server Side
I have multiple checkbox groups, radial buttons lists, with events (on change) and when they have "full update", there is kind of "lag" when you check values (I can't use partial updates). Its kind of survey system and I need to update sometimes page for example for disabling questions where there is max amount of answers that you can check.
Jun 8, 2012, 8:11 PM
135 Posts
Re: Full update using command - Server Side
How about doing the disabling in client side Javascript?
Jun 8, 2012, 8:50 PM
68 Posts
Re: Full update using command - Server Side
Nice idea but can you give me some idea how you want to achive something like this in repeated checkboxlists etc ? simple example like - you can't check more than 2 checkboxes
Jun 9, 2012, 3:19 PM
135 Posts
Re: Full update using command - Server Side
This way you can get all checked check boxes:
 
dojo.query('input[type=checkbox]:checked');
Jun 9, 2012, 6:29 PM
68 Posts
Re: Full update using command - Server Side
but how can I disable checkboxes :) for example all in one group
Jun 9, 2012, 6:58 PM
135 Posts
Re: Full update using command - Server Side
With element.disabled = true; 
 
XPages Check Box Group generates a <table> and you might be able to disable the table.
 
If that does not work, all checkboxes in the group have the same name and you can use dojo.query to get them all. Then just iterate the check box collection and disable them.
Jun 9, 2012, 8:45 PM
68 Posts
Re: Full update using command - Server Side
 Any of those don't work:
 
var iloscID = '#{javascript:getClientId("checkBox1")}';
document.iloscID.disabled = true;
 
document.getElementById(iloscID).disabled = true;
 
iloscID.disabled = true;


Jun 10, 2012, 5:42 AM
135 Posts
Re: Full update using command - Server Side
The check boxes generated by an XPage do not have IDs (at least in 8.5.1 where I tested). You'll have to get them by name. I think this should do it (not tested):
 
dojo.query('input[name='+iloscID+']');
 
or without Dojo:
 
document.getElementsByName(iloscID);
 
Jun 10, 2012, 7:24 PM
68 Posts
Re: Full update using command - Server Side
Any of this scripts don't work ... maybe I'm doing somethign wrong but this is strange its simple code ...
 
Take a look:
    <xp:button value="Label" id="button1">
    <xp:eventHandler event="onclick" submit="false">
        <xp:this.script>
            <xp:executeClientScript>
                <xp:this.script><![CDATA[var iloscID = "checkBox1";
dojo.query('input[name='+iloscID+']').disabled = true;
]]></xp:this.script>
            </xp:executeClientScript>
        </xp:this.script></xp:eventHandler></xp:button>
    <xp:checkBox text="Label" id="checkBox1"></xp:checkBox></xp:view>
Jun 10, 2012, 7:29 PM
68 Posts
Re: Full update using command - Server Side
resolved by:
 
dojo.byId("#{id:checkBox1}").disabled = true;

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal